﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrokerBase.Lib.Policy;

namespace broker.duty.hz
{
    class Class1
    {
        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.SchemePeriodActing.InsurantStates.Contains("重疾"))
            {
                if (ppa.Age >=18)
                {
                    da.Value = ppa.Amount;
                    ppa.IsCurrentFinish = true;
                }
            }
        }

        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.SchemePeriodActing.InsurantStates.Contains("身故"))
            {
                if (ppa.Age < 18)
                {
                    da.Value = ppa.TotalFee;
                }else
                {
                    da.Value=ppa.Amount;
                }
                ppa.IsCurrentFinish = true;
            }
        }

        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.Period > 0 && ppa.PolicyActing.PeriodActings[ppa.Period - 1].SchemePeriodActing.InsurantStates.Contains("全残"))
            {
                ppa.Fee = 0;

                ppa.IsCurrentFinish = true;
            }
        }
    }
}
